<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>显示查询自己的IP地址</title>
<meta name="keywords" content="IP地址" />
<meta name="description" content="从中国和美国显示查询自己的IP地址" />

	<link rel="icon"		href="/favicon.ico"	type="image/x-icon" />
	<link rel="shortcut icon"	href="/favicon.ico"	type="image/x-icon" />
    <!-- Bootstrap core CSS -->
    <link href="bootstrap.min.css" rel="stylesheet">
    <link href="jumbotron-narrow.css" rel="stylesheet">

<style>
body{
word-wrap: break-word;
}
</style>

<script>
var _hmt = _hmt || [];
(function() {
	  var hm = document.createElement("script");
	    hm.src = "https://hm.baidu.com/hm.js?2b3241fc6a3f4c2def14582892bc3db5";
	      var s = document.getElementsByTagName("script")[0]; 
	        s.parentNode.insertBefore(hm, s);
})();
</script>


  </head>

  <body>

    <div class="container">
      <div class="header clearfix">
            <h3 class="text-muted">全方位查询您的IP地址</h3>
      </div>

	<div class="jumbotron">
		<table class="table table-bordered" >
			<tr>
				<td width="30%">检测点</td>
				<td width="30%" class="text-left">检测结果</td>
				<td>解释</td>
			</tr>


			<tr>
				<td>内网IP</td>
				<td class="text-left">
					<span id="LANIP"> 内网IP</span>
			        <!--iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe-->
				<script>
					window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;   //compatibility for firefox and chrome
				    	var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){};      
    					pc.createDataChannel("");    //create a bogus data channel
        				pc.createOffer(pc.setLocalDescription.bind(pc), noop);    // create offer and set local description
	    				pc.onicecandidate = function(ice){  //listen for candidate events
		            		if(!ice || !ice.candidate || !ice.candidate.candidate)  return;
			            		var myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1];
			            		console.log('my IP: ', myIP);   
						document.getElementById("LANIP").textContent=myIP;
			            		pc.onicecandidate = noop;
				        };
			        </script>

			</td>
				<td>这是通过WebRTC协议获取的您的内网IP</td>
			</tr>
			
			<tr>
				<td>国内网站</td>
				<td>

<iframe src="http://ip.3322.org/" width="100%" height="30" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"> </iframe> 
				</td>
				<td>如果没有全局代理或者VPx，左侧显示的IP就是您本机的IP。如果有，则显示的就是全局代理或者VPx的IP地址。</td>
			</tr>



			<tr>
				<td>国外网站 </td>
				<td>
<!--iframe src="http://yar999.tk/ip.php" width="100%" height="30" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"> </iframe--> 
<iframe src="http://eth0.me" width="100%" height="30" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"> </iframe> 
				</td>
				<td>左侧IP就是您用来访问国外普通网站（没有被封的网站）的IP地址。</td>
			</tr>


			<tr>
				<td>谷歌网站</td>
				<td>
<iframe src="http://ipv4.appspot.com/" width="100%" height="30" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"> 
<!--iframe src="http://ip.appspot.com/" width="100%" height="30" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"--> 

您无法
</iframe> 
</td>
				<td>左侧如果没有显示一个IP地址，则说明您现在还不能上网，不能访问谷歌，Facebook，Twitter等国外网站。显示IP则表示可以上网，这个IP地址就是您用来科学上网的IP地址，通常是您的SS服务器的IP地址，或者VPx服务器，服务器的IP地址。</td>
			</tr>


		</table>

      </div>
	<p>网速测试请到 <a href="//speedtest.net"> speedtest.net</a>  </p>


      <footer class="footer">
        <p>Powered By <a href="https://www.linkown.com">linkown.com</a>. Inspired by ip111.cn </p>
      </footer>

    </div> <!-- /container -->


  </body>
</html>

